package demo.common.id;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer;
import org.springframework.stereotype.Service;

@Service
public class IdServiceImpl implements IdService {

	@Autowired
	private DataFieldMaxValueIncrementer dataFieldMaxValueIncrementer;
	
	@Override
	public int nextId() {
		return dataFieldMaxValueIncrementer.nextIntValue();
	}
	
}
